﻿<?
class admin extends c{
	function def(){
		if($_SESSION["admin"]!="admin"){
			header("location:?admin,login");
		}
	}
	function login(){
	}
	function dologin(){
	}
	function post(){
	
	}
	function dopost($pass,$title,$text){
		if($pass=="mw00990000"){
			$sql="insert into blog (title,text) values ('$title','$text')";
			mysql_query($sql);
			$this->set(array(
			'$msg'=>'发布成功！'
			));
		}else{
			$this->set(array(
			'$msg'=>'发布密码错误！'
			));
		}
	}
}
?>